package com.cn.ycy.aop.xml;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.aop.MethodBeforeAdvice;
import org.springframework.stereotype.Component;

import java.lang.reflect.Method;

/**
 * 配置文件 演示aop
 * 也是基于配置实现 但是有点不一样 需要细品
 */
@Component
public class AOPXMLAdvisor implements MethodBeforeAdvice {

  Logger logger = LoggerFactory.getLogger(AOPXMLAdvisor.class);

  @Override
  public void before(Method method, Object[] args, Object target) throws Throwable {
    logger.info("before");
  }


}
